package com.itheima.dbservice;

import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mapper.SoulScoreMapper;
import com.itheima.pojo.SoulScore;
import lombok.Data;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class SoulScoreServiceApiImpl implements SoulScoreServiceApi{
    @Autowired
    private SoulScoreMapper soulScoreMapper;

    @Override
    public SoulScore getById(String questionId) {
        LambdaQueryWrapper<SoulScore> lqw = new LambdaQueryWrapper<>();
        lqw.eq(SoulScore::getId, Convert.toInt(questionId));
        return soulScoreMapper.selectOne(lqw);
    }
}
